home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / clang / portablc.zip / SPLIT_F.DOC < prev   
Text File  |  1986-07-12  |  6KB  |  132 lines

  1.                                      SPLIT
  2.        
  3.                            written by Charlie Beerman
  4.                                  July 12, 1986
  5.        
  6.        
  7.             SPLIT  has  been  written  using  the  Lattice  C  compiler, 
  8.        version  2.0,  on  an  AT&T  6300 with MS-DOS 2.11.  It is hereby 
  9.        placed  in  the  public  domain,  with  no  warranties express or 
  10.        implied.
  11.        
  12.             The  purpose  of  SPLIT  is  to  split a large file (text or 
  13.        binary)  into  a  series  of smaller files, and then to recombine 
  14.        those  component  files  back into an exact copy of the original.  
  15.        This  is useful for several purposes, among which are the storage 
  16.        of  a  very large file ( > 360K ) on several floppy disks, or the 
  17.        piecewise  transfer  of  a large file over a communications line.  
  18.        The  latter  has  been my motivation for writing this program.  I 
  19.        suffer  from  a  noisy  phone  line,  and  find that in trying to 
  20.        transfer  large  files I get halfway (not even) done and a glitch 
  21.        in  the  line  trashes the transfer.  I figure I can successfully 
  22.        transfer  a  file  in  several small pieces and provide a utility 
  23.        for recombining it.
  24.        
  25.             SPLIT is fairly easy to use.  There are three main usages:
  26.        
  27.                   1.)   Split a file into components of specified size.
  28.                   2.)   Split   a   file  into  a  specified  number  of 
  29.                         components.
  30.                   3.)   Recombine a file from its components.
  31.        
  32.        
  33.        1.)  Splitting a file into components of specified size:
  34.        
  35.             Enter the command
  36.             
  37.             SPLIT  S  Ki  File_to_split  Component_prefix
  38.             
  39.             Where
  40.                   i is the desired size in KILOBYTES of the components.
  41.                   File_to_split is the file to be divided.
  42.                   Component_prefix is the filename (without extension)
  43.                         of the components.
  44.             
  45.             The  program  will display a summary of the file size of the 
  46.             file  to  be  split,  the specified component file size, and 
  47.             the  number  of  files it will create.  It also displays the 
  48.             name  and size of each file it creates.  (Note that the last 
  49.             file  may  be  smaller  than the others.)  The files created 
  50.             are  named  by  taking  the  specified  Component prefix and 
  51.             appending the extension
  52.             
  53.             .-nn
  54.             
  55.             to   the   filename.   The  nn  in  the  component  file  is 
  56.             sequentially  numbered  for  each  component  file  created.  
  57.             Thus,  if  the  source  file  has  50K bytes and the maximum 
  58.             component  filesize  is  25K bytes, and the specified prefix 
  59.             is "PREFIX", then two files will be created with names
  60.  
  61.             PREFIX.-01  and
  62.             PREFIX.-02
  63.             
  64.                   At  the  completion  of  the process the total size of 
  65.             the  components  is  displayed  as  a  check  for successful 
  66.             execution.
  67.             
  68.        2.)  Splitting a file into a specified number of files:
  69.             
  70.             Enter the command
  71.             
  72.             SPLIT  S  Ni  File_to_split  Component_prefix
  73.             
  74.             Where
  75.                   i is the number of components to create.
  76.                   all the rest of the arguments are the same as above.
  77.             
  78.             The  component  files  will  all  be  of  equal size (except 
  79.             perhaps  the last one), and will be named in the same way as 
  80.             above.    The  same  summary  information  is  displayed  as 
  81.             processing occurs.
  82.             
  83.             
  84.        3.)  Combining components into a single file:
  85.             
  86.             Enter the command
  87.             
  88.             SPLIT  C  File_to_create  Component_list
  89.             
  90.             Where
  91.                   File_to_create is the sum of the components
  92.                   Component_list is a list of files to combine in the
  93.                         specified order.  Filenames are separated by
  94.                         spaces.
  95.             
  96.             This  will  combine the files in the component list into the 
  97.             specified  create  file.   The created file may not have the 
  98.             same  name  as any of the component files.  The names of the 
  99.             files are displayed as they are added to the created file.
  100.             
  101.        
  102.        4.)  Notes, Restrictions and Errors:
  103.             
  104.             A  maximum  of  99  component  files can be created for each 
  105.             split.   An error message will be issued if you ask for more 
  106.             than  99  files  or ask for such a small component size that 
  107.             more than 99 files would have to be created.
  108.             
  109.             You  may  not  split  files  into  components  of  less than 
  110.             4 Kilobytes.   Again,  the  program will tell you if you try 
  111.             to do this.
  112.             
  113.             Arguments  may be entered in upper or lower case, and should 
  114.             be  separated  by  spaces.   There  should  NOT  be  a space 
  115.             between  the  "K"  or  "N"  and the number which follows it.  
  116.             The  program  checks  for  the  proper  number  and  type of 
  117.             arguments as much as it can.
  118.  
  119.             The  filenames  may  include  drive  and/or path specifiers.  
  120.             They may NOT include wildcards (* or ?).
  121.             
  122.             The  program  will tell you if it cannot open, read from, or 
  123.             write  to  a  file.   Common  causes  of  such  errors are a 
  124.             mistyped  filename,  a missing file, or a write-protected or 
  125.             full disk.
  126.             
  127.             Any  files  which  already  exist  when the program tries to 
  128.             create them will be destroyed before being created.
  129.             
  130.             Some  of  the  error  messages  refer  to component files as 
  131.             "section files".
  132.